Don't display div is there are no child pages or related documents [SOLVED]
Ok so I have a div on a page that is going to show a list of subpages and a list of related documents, what I want though is for the div not to show if neither of these two items exist (i.e. there are no subpages and no related documents). I realise I need to use an IF statement but I'm not sure exactly what it will be. I currently have the following code, as you will be able to see I have put an IF statement in to not show the related documents if there are not any but what I need is an IF statement to go around the whole lot so that if there are no sub pages and no related documents then the div does not show. Can anyone help??
Cheers Warren, that is almost exactly what I needed, I just had to change the "and" for an "or" and it does exactly what I wanted, I also added another IF statement in to stop it showing an empty
when there were no child pages to show because it was causing a formatting issue, here is the final XSLT for anyone who is interested:
Don't display div is there are no child pages or related documents [SOLVED]
Ok so I have a div on a page that is going to show a list of subpages and a list of related documents, what I want though is for the div not to show if neither of these two items exist (i.e. there are no subpages and no related documents). I realise I need to use an IF statement but I'm not sure exactly what it will be. I currently have the following code, as you will be able to see I have put an IF statement in to not show the related documents if there are not any but what I need is an IF statement to go around the whole lot so that if there are no sub pages and no related documents then the div does not show. Can anyone help??
[code]
You may also find helpful...
Hi Tony,
Just done this off the top of my head but it should work.
[code]
Cheers Warren, that is almost exactly what I needed, I just had to change the "and" for an "or" and it does exactly what I wanted, I also added another IF statement in to stop it showing an empty
when there were no child pages to show because it was causing a formatting issue, here is the final XSLT for anyone who is interested:
[code][/code]
is working on a reply...